﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Tinkle
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string linkSelecionado = Request.QueryString["link"] != null ? Request.QueryString["link"].ToString() : "Home";
            string subSelecionado = Request.QueryString["sub"] != null ? Request.QueryString["sub"].ToString() : "";
            if (subSelecionado.Equals(string.Empty))
            {
                phCorpo.Controls.Add(LoadControl("~/Mod/" + linkSelecionado + ".ascx"));
            }
            else
            {
                phCorpo.Controls.Add(LoadControl("~/Mod/" + subSelecionado + ".ascx"));
            }
        }
    }
}